import unittest
from one.zhoukao3.Tools import Tools
from XTestRunner import HTMLTestRunner
if __name__ == '__main__':
    run=unittest.defaultTestLoader.discover(start_dir='/', pattern='TestCase.py')
    Tools().log_info('info.txt','w+')

    with open('baogao.html', 'wb') as e:
        suite=HTMLTestRunner(stream=e,title='测试报告',language='zh-CN')
        suite.run(run)
        Tools().send_email('测试报告',['baogao.html','info.txt'])